package cn.bdqn.service.impl;

import cn.bdqn.dao.AppInfoMapper;
import cn.bdqn.pojo.AppInfo;
import cn.bdqn.service.AppInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AppInfoServiceImpl implements AppInfoService {
    @Resource
    private AppInfoMapper appInfoMapper;
    @Override
    public List<AppInfo> getAppInfoList() {
        return appInfoMapper.findAll();
    }

    @Override
    @Transactional
    public int delById(Integer id) {
        try {
            return appInfoMapper.del(id);
        } catch (RuntimeException e) {
            e.printStackTrace();
            throw e;
        }
    }
}
